<%@page import="anveshitha.config.ConfigUtils"%>
<%@page import="java.util.Date"%>
<%@page import="java.text.SimpleDateFormat"%>
<jsp:include page="header.jsp"></jsp:include>
<div id="mainBody">
<%
	Date indexedDate = new Date(Long.parseLong(ConfigUtils
			.getFromProperties("java_lastindexedtime")));
	SimpleDateFormat sdf = new SimpleDateFormat(
			"EEE, d MMM yyyy hh:mm:ss a z");
%> &nbsp;<u>Last indexed java files on</u>: <%=sdf.format(indexedDate)%>
<hr />
<div id="searchBar" >
<form action="/ExecuteQueryServlet.an" onsubmit="getResults();return false;" name="searchForm">
<table>
	<tr>
		<td><strong>Search:&nbsp;&nbsp;</strong></td>
		<td nowrap="nowrap">Language <select name="selLanguage">
			<option value="java" selected="selected">Java</option>
		</select></td>
		<td>&nbsp;&nbsp;</td>
		<td>Query <textarea rows="3" cols="25" name="textQuery" onfocus="initQuery();" style="vertical-align: middle"></textarea></td>
		<td><input type="submit" value="Execute" name="submitButton" /> <br /><br />
			<input type="button" name="clearTextQuery" onclick="clearQuery();" value="Clear" />
		</td>
		<td nowrap="nowrap">&nbsp;&nbsp;&nbsp;&nbsp;</td>
		<td><div id="queryBuilder">
			<strong>Query Builder</strong><br />
		Field&nbsp;&nbsp;&nbsp;:&nbsp; <select name="selField">
			<option value="EXTENDS">Superclass (Extends)
			<option value="CLASSNAME">Classname
			<option value="IMPORT">Imports
			<option value="METHODNAME">Methodname
			<option value="METHODCODE">Methodcode
			<option value="METHODPARAMTYPE">Method Param Type
			<option value="RETURNTYPE">Returntype
			<option value="COMMENTS" disabled="disabled">Comments
			<option value="IMPLEMENTS">Implements
			<option value="PACKAGENAME">Packagename
			<option value="FILEPATH">Filepath
		</select> <input type="text" name="txtField" value="" /> <input type="button"
			name="addField" onclick="addFieldToQuery();" value="Add" /><br />
		Clause:&nbsp; <select name="selClause">
			<option value="NOT">Does Not Contain
			<option value="OR">Or
			<option value="AND">And
		</select>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" name="addClause" onclick="addClauseToQuery();"
			value="Add" /></div>
		</td>
	</tr>
</table>
</form>
<script type="text/javascript">
clearQuery();
</script>
</div>
<hr />
<br /><br />
<div id="searchResults"  align="center"></div>
</div>
<br /><br />
<jsp:include page="footer.jsp"></jsp:include>
